# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         demo02
# Description:
# Author:       98745
# Date:         2019/3/3
#-------------------------------------------------------------------------------

class B:
    def __init__(self):
        self.h=True
    def e(self):
        if self.h:
            print('已经吃了虫子')
            self.h=False
        else:
            print('已经吃过饭了，不饿了')

b=B()
b.e()
b.e()

class SB(B):
    def __init__(self):
        self.s='向天再借500年'
    def sing(self):
        print(self.s)
    def e(self,th):
        print(th)
sb=SB()
sb.sing()
sb.e('enen')